\(\int \frac {a+b \csc ^{-1}(c x)}{x^2 (d+e x^2)} \, dx\) [102]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [C] (verified)
   Fricas [F]
   Sympy [F]
   Maxima [F(-2)]
   Giac [F(-2)]
   Mupad [F(-1)]

Optimal result

Integrand size = 21, antiderivative size = 572 \[ \int \frac {a+b \csc ^{-1}(c x)}{x^2 \left (d+e x^2\right )} \, dx=-\frac {b c \sqrt {1-\frac {1}{c^2 x^2}}}{d}-\frac {a}{d x}-\frac {b \csc ^{-1}(c x)}{d x}-\frac {\sqrt {e} \left (a+b \csc ^{-1}(c x)\right ) \log \left (1-\frac {i c \sqrt {-d} e^{i \csc ^{-1}(c x)}}{\sqrt {e}-\sqrt {c^2 d+e}}\right )}{2 (-d)^{3/2}}+\frac {\sqrt {e} \left (a+b \csc ^{-1}(c x)\right ) \log \left (1+\frac {i c \sqrt {-d} e^{i \csc ^{-1}(c x)}}{\sqrt {e}-\sqrt {c^2 d+e}}\right )}{2 (-d)^{3/2}}-\frac {\sqrt {e} \left (a+b \csc ^{-1}(c x)\right ) \log \left (1-\frac {i c \sqrt {-d} e^{i \csc ^{-1}(c x)}}{\sqrt {e}+\sqrt {c^2 d+e}}\right )}{2 (-d)^{3/2}}+\frac {\sqrt {e} \left (a+b \csc ^{-1}(c x)\right ) \log \left (1+\frac {i c \sqrt {-d} e^{i \csc ^{-1}(c x)}}{\sqrt {e}+\sqrt {c^2 d+e}}\right )}{2 (-d)^{3/2}}-\frac {i b \sqrt {e} \operatorname {PolyLog}\left (2,-\frac {i c \sqrt {-d} e^{i \csc ^{-1}(c x)}}{\sqrt {e}-\sqrt {c^2 d+e}}\right )}{2 (-d)^{3/2}}+\frac {i b \sqrt {e} \operatorname {PolyLog}\left (2,\frac {i c \sqrt {-d} e^{i \csc ^{-1}(c x)}}{\sqrt {e}-\sqrt {c^2 d+e}}\right )}{2 (-d)^{3/2}}-\frac {i b \sqrt {e} \operatorname {PolyLog}\left (2,-\frac {i c \sqrt {-d} e^{i \csc ^{-1}(c x)}}{\sqrt {e}+\sqrt {c^2 d+e}}\right )}{2 (-d)^{3/2}}+\frac {i b \sqrt {e} \operatorname {PolyLog}\left (2,\frac {i c \sqrt {-d} e^{i \csc ^{-1}(c x)}}{\sqrt {e}+\sqrt {c^2 d+e}}\right )}{2 (-d)^{3/2}} \]

[Out]

-a/d/x-b*arccsc(c*x)/d/x-1/2*(a+b*arccsc(c*x))*ln(1-I*c*(I/c/x+(1-1/c^2/x^2)^(1/2))*(-d)^(1/2)/(e^(1/2)-(c^2*d
+e)^(1/2)))*e^(1/2)/(-d)^(3/2)+1/2*(a+b*arccsc(c*x))*ln(1+I*c*(I/c/x+(1-1/c^2/x^2)^(1/2))*(-d)^(1/2)/(e^(1/2)-
(c^2*d+e)^(1/2)))*e^(1/2)/(-d)^(3/2)-1/2*(a+b*arccsc(c*x))*ln(1-I*c*(I/c/x+(1-1/c^2/x^2)^(1/2))*(-d)^(1/2)/(e^
(1/2)+(c^2*d+e)^(1/2)))*e^(1/2)/(-d)^(3/2)+1/2*(a+b*arccsc(c*x))*ln(1+I*c*(I/c/x+(1-1/c^2/x^2)^(1/2))*(-d)^(1/
2)/(e^(1/2)+(c^2*d+e)^(1/2)))*e^(1/2)/(-d)^(3/2)-1/2*I*b*polylog(2,-I*c*(I/c/x+(1-1/c^2/x^2)^(1/2))*(-d)^(1/2)
/(e^(1/2)-(c^2*d+e)^(1/2)))*e^(1/2)/(-d)^(3/2)+1/2*I*b*polylog(2,I*c*(I/c/x+(1-1/c^2/x^2)^(1/2))*(-d)^(1/2)/(e
^(1/2)-(c^2*d+e)^(1/2)))*e^(1/2)/(-d)^(3/2)-1/2*I*b*polylog(2,-I*c*(I/c/x+(1-1/c^2/x^2)^(1/2))*(-d)^(1/2)/(e^(
1/2)+(c^2*d+e)^(1/2)))*e^(1/2)/(-d)^(3/2)+1/2*I*b*polylog(2,I*c*(I/c/x+(1-1/c^2/x^2)^(1/2))*(-d)^(1/2)/(e^(1/2
)+(c^2*d+e)^(1/2)))*e^(1/2)/(-d)^(3/2)-b*c*(1-1/c^2/x^2)^(1/2)/d

Rubi [A] (verified)

Time = 0.78 (sec) , antiderivative size = 572, normalized size of antiderivative = 1.00, number of steps used = 24, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.476, Rules used = {5349, 4817, 4715, 267, 4757, 4825, 4615, 2221, 2317, 2438} \[ \int \frac {a+b \csc ^{-1}(c x)}{x^2 \left (d+e x^2\right )} \, dx=-\frac {\sqrt {e} \left (a+b \csc ^{-1}(c x)\right ) \log \left (1-\frac {i c \sqrt {-d} e^{i \csc ^{-1}(c x)}}{\sqrt {e}-\sqrt {c^2 d+e}}\right )}{2 (-d)^{3/2}}+\frac {\sqrt {e} \left (a+b \csc ^{-1}(c x)\right ) \log \left (1+\frac {i c \sqrt {-d} e^{i \csc ^{-1}(c x)}}{\sqrt {e}-\sqrt {c^2 d+e}}\right )}{2 (-d)^{3/2}}-\frac {\sqrt {e} \left (a+b \csc ^{-1}(c x)\right ) \log \left (1-\frac {i c \sqrt {-d} e^{i \csc ^{-1}(c x)}}{\sqrt {c^2 d+e}+\sqrt {e}}\right )}{2 (-d)^{3/2}}+\frac {\sqrt {e} \left (a+b \csc ^{-1}(c x)\right ) \log \left (1+\frac {i c \sqrt {-d} e^{i \csc ^{-1}(c x)}}{\sqrt {c^2 d+e}+\sqrt {e}}\right )}{2 (-d)^{3/2}}-\frac {a}{d x}-\frac {i b \sqrt {e} \operatorname {PolyLog}\left (2,-\frac {i c \sqrt {-d} e^{i \csc ^{-1}(c x)}}{\sqrt {e}-\sqrt {d c^2+e}}\right )}{2 (-d)^{3/2}}+\frac {i b \sqrt {e} \operatorname {PolyLog}\left (2,\frac {i c \sqrt {-d} e^{i \csc ^{-1}(c x)}}{\sqrt {e}-\sqrt {d c^2+e}}\right )}{2 (-d)^{3/2}}-\frac {i b \sqrt {e} \operatorname {PolyLog}\left (2,-\frac {i c \sqrt {-d} e^{i \csc ^{-1}(c x)}}{\sqrt {e}+\sqrt {d c^2+e}}\right )}{2 (-d)^{3/2}}+\frac {i b \sqrt {e} \operatorname {PolyLog}\left (2,\frac {i c \sqrt {-d} e^{i \csc ^{-1}(c x)}}{\sqrt {e}+\sqrt {d c^2+e}}\right )}{2 (-d)^{3/2}}-\frac {b c \sqrt {1-\frac {1}{c^2 x^2}}}{d}-\frac {b \csc ^{-1}(c x)}{d x} \]

[In]

Int[(a + b*ArcCsc[c*x])/(x^2*(d + e*x^2)),x]

[Out]

-((b*c*Sqrt[1 - 1/(c^2*x^2)])/d) - a/(d*x) - (b*ArcCsc[c*x])/(d*x) - (Sqrt[e]*(a + b*ArcCsc[c*x])*Log[1 - (I*c
*Sqrt[-d]*E^(I*ArcCsc[c*x]))/(Sqrt[e] - Sqrt[c^2*d + e])])/(2*(-d)^(3/2)) + (Sqrt[e]*(a + b*ArcCsc[c*x])*Log[1
 + (I*c*Sqrt[-d]*E^(I*ArcCsc[c*x]))/(Sqrt[e] - Sqrt[c^2*d + e])])/(2*(-d)^(3/2)) - (Sqrt[e]*(a + b*ArcCsc[c*x]
)*Log[1 - (I*c*Sqrt[-d]*E^(I*ArcCsc[c*x]))/(Sqrt[e] + Sqrt[c^2*d + e])])/(2*(-d)^(3/2)) + (Sqrt[e]*(a + b*ArcC
sc[c*x])*Log[1 + (I*c*Sqrt[-d]*E^(I*ArcCsc[c*x]))/(Sqrt[e] + Sqrt[c^2*d + e])])/(2*(-d)^(3/2)) - ((I/2)*b*Sqrt
[e]*PolyLog[2, ((-I)*c*Sqrt[-d]*E^(I*ArcCsc[c*x]))/(Sqrt[e] - Sqrt[c^2*d + e])])/(-d)^(3/2) + ((I/2)*b*Sqrt[e]
*PolyLog[2, (I*c*Sqrt[-d]*E^(I*ArcCsc[c*x]))/(Sqrt[e] - Sqrt[c^2*d + e])])/(-d)^(3/2) - ((I/2)*b*Sqrt[e]*PolyL
og[2, ((-I)*c*Sqrt[-d]*E^(I*ArcCsc[c*x]))/(Sqrt[e] + Sqrt[c^2*d + e])])/(-d)^(3/2) + ((I/2)*b*Sqrt[e]*PolyLog[
2, (I*c*Sqrt[-d]*E^(I*ArcCsc[c*x]))/(Sqrt[e] + Sqrt[c^2*d + e])])/(-d)^(3/2)

Rule 267

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(a + b*x^n)^(p + 1)/(b*n*(p + 1)), x] /; FreeQ
[{a, b, m, n, p}, x] && EqQ[m, n - 1] && NeQ[p, -1]

Rule 2221

Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/((a_) + (b_.)*((F_)^((g_.)*((e_.) +
 (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp[((c + d*x)^m/(b*f*g*n*Log[F]))*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x]
 - Dist[d*(m/(b*f*g*n*Log[F])), Int[(c + d*x)^(m - 1)*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x], x] /; FreeQ[{F,
a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]

Rule 2317

Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Dist[1/(d*e*n*Log[F]), Subst[Int
[Log[a + b*x]/x, x], x, (F^(e*(c + d*x)))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 4615

Int[(Cos[(c_.) + (d_.)*(x_)]*((e_.) + (f_.)*(x_))^(m_.))/((a_) + (b_.)*Sin[(c_.) + (d_.)*(x_)]), x_Symbol] :>
Simp[(-I)*((e + f*x)^(m + 1)/(b*f*(m + 1))), x] + (Int[(e + f*x)^m*(E^(I*(c + d*x))/(a - Rt[a^2 - b^2, 2] - I*
b*E^(I*(c + d*x)))), x] + Int[(e + f*x)^m*(E^(I*(c + d*x))/(a + Rt[a^2 - b^2, 2] - I*b*E^(I*(c + d*x)))), x])
/; FreeQ[{a, b, c, d, e, f}, x] && IGtQ[m, 0] && PosQ[a^2 - b^2]

Rule 4715

Int[((a_.) + ArcSin[(c_.)*(x_)]*(b_.))^(n_.), x_Symbol] :> Simp[x*(a + b*ArcSin[c*x])^n, x] - Dist[b*c*n, Int[
x*((a + b*ArcSin[c*x])^(n - 1)/Sqrt[1 - c^2*x^2]), x], x] /; FreeQ[{a, b, c}, x] && GtQ[n, 0]

Rule 4757

Int[((a_.) + ArcSin[(c_.)*(x_)]*(b_.))^(n_.)*((d_) + (e_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(a
+ b*ArcSin[c*x])^n, (d + e*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, n}, x] && NeQ[c^2*d + e, 0] && IntegerQ[p]
&& (GtQ[p, 0] || IGtQ[n, 0])

Rule 4817

Int[((a_.) + ArcSin[(c_.)*(x_)]*(b_.))^(n_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^2)^(p_.), x_Symbol] :> Int[
ExpandIntegrand[(a + b*ArcSin[c*x])^n, (f*x)^m*(d + e*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[c^
2*d + e, 0] && IGtQ[n, 0] && IntegerQ[p] && IntegerQ[m]

Rule 4825

Int[((a_.) + ArcSin[(c_.)*(x_)]*(b_.))^(n_.)/((d_) + (e_.)*(x_)), x_Symbol] :> Subst[Int[(a + b*x)^n*(Cos[x]/(
c*d + e*Sin[x])), x], x, ArcSin[c*x]] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[n, 0]

Rule 5349

Int[((a_.) + ArcCsc[(c_.)*(x_)]*(b_.))^(n_.)*(x_)^(m_.)*((d_.) + (e_.)*(x_)^2)^(p_.), x_Symbol] :> -Subst[Int[
(e + d*x^2)^p*((a + b*ArcSin[x/c])^n/x^(m + 2*(p + 1))), x], x, 1/x] /; FreeQ[{a, b, c, d, e, n}, x] && IGtQ[n
, 0] && IntegerQ[m] && IntegerQ[p]

Rubi steps \begin{align*} \text {integral}& = -\text {Subst}\left (\int \frac {x^2 \left (a+b \arcsin \left (\frac {x}{c}\right )\right )}{e+d x^2} \, dx,x,\frac {1}{x}\right ) \\ & = -\text {Subst}\left (\int \left (\frac {a+b \arcsin \left (\frac {x}{c}\right )}{d}-\frac {e \left (a+b \arcsin \left (\frac {x}{c}\right )\right )}{d \left (e+d x^2\right )}\right ) \, dx,x,\frac {1}{x}\right ) \\ & = -\frac {\text {Subst}\left (\int \left (a+b \arcsin \left (\frac {x}{c}\right )\right ) \, dx,x,\frac {1}{x}\right )}{d}+\frac {e \text {Subst}\left (\int \frac {a+b \arcsin \left (\frac {x}{c}\right )}{e+d x^2} \, dx,x,\frac {1}{x}\right )}{d} \\ & = -\frac {a}{d x}-\frac {b \text {Subst}\left (\int \arcsin \left (\frac {x}{c}\right ) \, dx,x,\frac {1}{x}\right )}{d}+\frac {e \text {Subst}\left (\int \left (\frac {a+b \arcsin \left (\frac {x}{c}\right )}{2 \sqrt {e} \left (\sqrt {e}-\sqrt {-d} x\right )}+\frac {a+b \arcsin \left (\frac {x}{c}\right )}{2 \sqrt {e} \left (\sqrt {e}+\sqrt {-d} x\right )}\right ) \, dx,x,\frac {1}{x}\right )}{d} \\ & = -\frac {a}{d x}-\frac {b \csc ^{-1}(c x)}{d x}+\frac {b \text {Subst}\left (\int \frac {x}{\sqrt {1-\frac {x^2}{c^2}}} \, dx,x,\frac {1}{x}\right )}{c d}+\frac {\sqrt {e} \text {Subst}\left (\int \frac {a+b \arcsin \left (\frac {x}{c}\right )}{\sqrt {e}-\sqrt {-d} x} \, dx,x,\frac {1}{x}\right )}{2 d}+\frac {\sqrt {e} \text {Subst}\left (\int \frac {a+b \arcsin \left (\frac {x}{c}\right )}{\sqrt {e}+\sqrt {-d} x} \, dx,x,\frac {1}{x}\right )}{2 d} \\ & = -\frac {b c \sqrt {1-\frac {1}{c^2 x^2}}}{d}-\frac {a}{d x}-\frac {b \csc ^{-1}(c x)}{d x}+\frac {\sqrt {e} \text {Subst}\left (\int \frac {(a+b x) \cos (x)}{\frac {\sqrt {e}}{c}-\sqrt {-d} \sin (x)} \, dx,x,\csc ^{-1}(c x)\right )}{2 d}+\frac {\sqrt {e} \text {Subst}\left (\int \frac {(a+b x) \cos (x)}{\frac {\sqrt {e}}{c}+\sqrt {-d} \sin (x)} \, dx,x,\csc ^{-1}(c x)\right )}{2 d} \\ & = -\frac {b c \sqrt {1-\frac {1}{c^2 x^2}}}{d}-\frac {a}{d x}-\frac {b \csc ^{-1}(c x)}{d x}+\frac {\sqrt {e} \text {Subst}\left (\int \frac {e^{i x} (a+b x)}{\frac {\sqrt {e}}{c}-\frac {\sqrt {c^2 d+e}}{c}-i \sqrt {-d} e^{i x}} \, dx,x,\csc ^{-1}(c x)\right )}{2 d}+\frac {\sqrt {e} \text {Subst}\left (\int \frac {e^{i x} (a+b x)}{\frac {\sqrt {e}}{c}+\frac {\sqrt {c^2 d+e}}{c}-i \sqrt {-d} e^{i x}} \, dx,x,\csc ^{-1}(c x)\right )}{2 d}+\frac {\sqrt {e} \text {Subst}\left (\int \frac {e^{i x} (a+b x)}{\frac {\sqrt {e}}{c}-\frac {\sqrt {c^2 d+e}}{c}+i \sqrt {-d} e^{i x}} \, dx,x,\csc ^{-1}(c x)\right )}{2 d}+\frac {\sqrt {e} \text {Subst}\left (\int \frac {e^{i x} (a+b x)}{\frac {\sqrt {e}}{c}+\frac {\sqrt {c^2 d+e}}{c}+i \sqrt {-d} e^{i x}} \, dx,x,\csc ^{-1}(c x)\right )}{2 d} \\ & = -\frac {b c \sqrt {1-\frac {1}{c^2 x^2}}}{d}-\frac {a}{d x}-\frac {b \csc ^{-1}(c x)}{d x}-\frac {\sqrt {e} \left (a+b \csc ^{-1}(c x)\right ) \log \left (1-\frac {i c \sqrt {-d} e^{i \csc ^{-1}(c x)}}{\sqrt {e}-\sqrt {c^2 d+e}}\right )}{2 (-d)^{3/2}}+\frac {\sqrt {e} \left (a+b \csc ^{-1}(c x)\right ) \log \left (1+\frac {i c \sqrt {-d} e^{i \csc ^{-1}(c x)}}{\sqrt {e}-\sqrt {c^2 d+e}}\right )}{2 (-d)^{3/2}}-\frac {\sqrt {e} \left (a+b \csc ^{-1}(c x)\right ) \log \left (1-\frac {i c \sqrt {-d} e^{i \csc ^{-1}(c x)}}{\sqrt {e}+\sqrt {c^2 d+e}}\right )}{2 (-d)^{3/2}}+\frac {\sqrt {e} \left (a+b \csc ^{-1}(c x)\right ) \log \left (1+\frac {i c \sqrt {-d} e^{i \csc ^{-1}(c x)}}{\sqrt {e}+\sqrt {c^2 d+e}}\right )}{2 (-d)^{3/2}}+\frac {\left (b \sqrt {e}\right ) \text {Subst}\left (\int \log \left (1-\frac {i \sqrt {-d} e^{i x}}{\frac {\sqrt {e}}{c}-\frac {\sqrt {c^2 d+e}}{c}}\right ) \, dx,x,\csc ^{-1}(c x)\right )}{2 (-d)^{3/2}}-\frac {\left (b \sqrt {e}\right ) \text {Subst}\left (\int \log \left (1+\frac {i \sqrt {-d} e^{i x}}{\frac {\sqrt {e}}{c}-\frac {\sqrt {c^2 d+e}}{c}}\right ) \, dx,x,\csc ^{-1}(c x)\right )}{2 (-d)^{3/2}}+\frac {\left (b \sqrt {e}\right ) \text {Subst}\left (\int \log \left (1-\frac {i \sqrt {-d} e^{i x}}{\frac {\sqrt {e}}{c}+\frac {\sqrt {c^2 d+e}}{c}}\right ) \, dx,x,\csc ^{-1}(c x)\right )}{2 (-d)^{3/2}}-\frac {\left (b \sqrt {e}\right ) \text {Subst}\left (\int \log \left (1+\frac {i \sqrt {-d} e^{i x}}{\frac {\sqrt {e}}{c}+\frac {\sqrt {c^2 d+e}}{c}}\right ) \, dx,x,\csc ^{-1}(c x)\right )}{2 (-d)^{3/2}} \\ & = -\frac {b c \sqrt {1-\frac {1}{c^2 x^2}}}{d}-\frac {a}{d x}-\frac {b \csc ^{-1}(c x)}{d x}-\frac {\sqrt {e} \left (a+b \csc ^{-1}(c x)\right ) \log \left (1-\frac {i c \sqrt {-d} e^{i \csc ^{-1}(c x)}}{\sqrt {e}-\sqrt {c^2 d+e}}\right )}{2 (-d)^{3/2}}+\frac {\sqrt {e} \left (a+b \csc ^{-1}(c x)\right ) \log \left (1+\frac {i c \sqrt {-d} e^{i \csc ^{-1}(c x)}}{\sqrt {e}-\sqrt {c^2 d+e}}\right )}{2 (-d)^{3/2}}-\frac {\sqrt {e} \left (a+b \csc ^{-1}(c x)\right ) \log \left (1-\frac {i c \sqrt {-d} e^{i \csc ^{-1}(c x)}}{\sqrt {e}+\sqrt {c^2 d+e}}\right )}{2 (-d)^{3/2}}+\frac {\sqrt {e} \left (a+b \csc ^{-1}(c x)\right ) \log \left (1+\frac {i c \sqrt {-d} e^{i \csc ^{-1}(c x)}}{\sqrt {e}+\sqrt {c^2 d+e}}\right )}{2 (-d)^{3/2}}-\frac {\left (i b \sqrt {e}\right ) \text {Subst}\left (\int \frac {\log \left (1-\frac {i \sqrt {-d} x}{\frac {\sqrt {e}}{c}-\frac {\sqrt {c^2 d+e}}{c}}\right )}{x} \, dx,x,e^{i \csc ^{-1}(c x)}\right )}{2 (-d)^{3/2}}+\frac {\left (i b \sqrt {e}\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {i \sqrt {-d} x}{\frac {\sqrt {e}}{c}-\frac {\sqrt {c^2 d+e}}{c}}\right )}{x} \, dx,x,e^{i \csc ^{-1}(c x)}\right )}{2 (-d)^{3/2}}-\frac {\left (i b \sqrt {e}\right ) \text {Subst}\left (\int \frac {\log \left (1-\frac {i \sqrt {-d} x}{\frac {\sqrt {e}}{c}+\frac {\sqrt {c^2 d+e}}{c}}\right )}{x} \, dx,x,e^{i \csc ^{-1}(c x)}\right )}{2 (-d)^{3/2}}+\frac {\left (i b \sqrt {e}\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {i \sqrt {-d} x}{\frac {\sqrt {e}}{c}+\frac {\sqrt {c^2 d+e}}{c}}\right )}{x} \, dx,x,e^{i \csc ^{-1}(c x)}\right )}{2 (-d)^{3/2}} \\ & = -\frac {b c \sqrt {1-\frac {1}{c^2 x^2}}}{d}-\frac {a}{d x}-\frac {b \csc ^{-1}(c x)}{d x}-\frac {\sqrt {e} \left (a+b \csc ^{-1}(c x)\right ) \log \left (1-\frac {i c \sqrt {-d} e^{i \csc ^{-1}(c x)}}{\sqrt {e}-\sqrt {c^2 d+e}}\right )}{2 (-d)^{3/2}}+\frac {\sqrt {e} \left (a+b \csc ^{-1}(c x)\right ) \log \left (1+\frac {i c \sqrt {-d} e^{i \csc ^{-1}(c x)}}{\sqrt {e}-\sqrt {c^2 d+e}}\right )}{2 (-d)^{3/2}}-\frac {\sqrt {e} \left (a+b \csc ^{-1}(c x)\right ) \log \left (1-\frac {i c \sqrt {-d} e^{i \csc ^{-1}(c x)}}{\sqrt {e}+\sqrt {c^2 d+e}}\right )}{2 (-d)^{3/2}}+\frac {\sqrt {e} \left (a+b \csc ^{-1}(c x)\right ) \log \left (1+\frac {i c \sqrt {-d} e^{i \csc ^{-1}(c x)}}{\sqrt {e}+\sqrt {c^2 d+e}}\right )}{2 (-d)^{3/2}}-\frac {i b \sqrt {e} \operatorname {PolyLog}\left (2,-\frac {i c \sqrt {-d} e^{i \csc ^{-1}(c x)}}{\sqrt {e}-\sqrt {c^2 d+e}}\right )}{2 (-d)^{3/2}}+\frac {i b \sqrt {e} \operatorname {PolyLog}\left (2,\frac {i c \sqrt {-d} e^{i \csc ^{-1}(c x)}}{\sqrt {e}-\sqrt {c^2 d+e}}\right )}{2 (-d)^{3/2}}-\frac {i b \sqrt {e} \operatorname {PolyLog}\left (2,-\frac {i c \sqrt {-d} e^{i \csc ^{-1}(c x)}}{\sqrt {e}+\sqrt {c^2 d+e}}\right )}{2 (-d)^{3/2}}+\frac {i b \sqrt {e} \operatorname {PolyLog}\left (2,\frac {i c \sqrt {-d} e^{i \csc ^{-1}(c x)}}{\sqrt {e}+\sqrt {c^2 d+e}}\right )}{2 (-d)^{3/2}} \\ \end{align*}

Mathematica [B] (verified)

Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(1241\) vs. \(2(572)=1144\).

Time = 1.81 (sec) , antiderivative size = 1241, normalized size of antiderivative = 2.17 \[ \int \frac {a+b \csc ^{-1}(c x)}{x^2 \left (d+e x^2\right )} \, dx=-\frac {a}{d x}-\frac {a \sqrt {e} \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{d^{3/2}}+b \left (-\frac {c \sqrt {1-\frac {1}{c^2 x^2}} x+\csc ^{-1}(c x)}{d x}+\frac {\sqrt {e} \left (\pi ^2-4 \pi \csc ^{-1}(c x)+8 \csc ^{-1}(c x)^2-32 \arcsin \left (\frac {\sqrt {1-\frac {i \sqrt {e}}{c \sqrt {d}}}}{\sqrt {2}}\right ) \arctan \left (\frac {\left (-i c \sqrt {d}+\sqrt {e}\right ) \cot \left (\frac {1}{4} \left (\pi +2 \csc ^{-1}(c x)\right )\right )}{\sqrt {c^2 d+e}}\right )+4 i \pi \log \left (1+\frac {\left (\sqrt {e}-\sqrt {c^2 d+e}\right ) e^{-i \csc ^{-1}(c x)}}{c \sqrt {d}}\right )-8 i \csc ^{-1}(c x) \log \left (1+\frac {\left (\sqrt {e}-\sqrt {c^2 d+e}\right ) e^{-i \csc ^{-1}(c x)}}{c \sqrt {d}}\right )+16 i \arcsin \left (\frac {\sqrt {1-\frac {i \sqrt {e}}{c \sqrt {d}}}}{\sqrt {2}}\right ) \log \left (1+\frac {\left (\sqrt {e}-\sqrt {c^2 d+e}\right ) e^{-i \csc ^{-1}(c x)}}{c \sqrt {d}}\right )+4 i \pi \log \left (1+\frac {\left (\sqrt {e}+\sqrt {c^2 d+e}\right ) e^{-i \csc ^{-1}(c x)}}{c \sqrt {d}}\right )-8 i \csc ^{-1}(c x) \log \left (1+\frac {\left (\sqrt {e}+\sqrt {c^2 d+e}\right ) e^{-i \csc ^{-1}(c x)}}{c \sqrt {d}}\right )-16 i \arcsin \left (\frac {\sqrt {1-\frac {i \sqrt {e}}{c \sqrt {d}}}}{\sqrt {2}}\right ) \log \left (1+\frac {\left (\sqrt {e}+\sqrt {c^2 d+e}\right ) e^{-i \csc ^{-1}(c x)}}{c \sqrt {d}}\right )+8 i \csc ^{-1}(c x) \log \left (1-e^{2 i \csc ^{-1}(c x)}\right )-4 i \pi \log \left (\sqrt {e}+\frac {i \sqrt {d}}{x}\right )+8 \operatorname {PolyLog}\left (2,\frac {\left (-\sqrt {e}+\sqrt {c^2 d+e}\right ) e^{-i \csc ^{-1}(c x)}}{c \sqrt {d}}\right )+8 \operatorname {PolyLog}\left (2,-\frac {\left (\sqrt {e}+\sqrt {c^2 d+e}\right ) e^{-i \csc ^{-1}(c x)}}{c \sqrt {d}}\right )+4 \operatorname {PolyLog}\left (2,e^{2 i \csc ^{-1}(c x)}\right )\right )}{16 d^{3/2}}-\frac {\sqrt {e} \left (\pi ^2-4 \pi \csc ^{-1}(c x)+8 \csc ^{-1}(c x)^2-32 \arcsin \left (\frac {\sqrt {1+\frac {i \sqrt {e}}{c \sqrt {d}}}}{\sqrt {2}}\right ) \arctan \left (\frac {\left (i c \sqrt {d}+\sqrt {e}\right ) \cot \left (\frac {1}{4} \left (\pi +2 \csc ^{-1}(c x)\right )\right )}{\sqrt {c^2 d+e}}\right )+4 i \pi \log \left (1+\frac {\left (-\sqrt {e}+\sqrt {c^2 d+e}\right ) e^{-i \csc ^{-1}(c x)}}{c \sqrt {d}}\right )-8 i \csc ^{-1}(c x) \log \left (1+\frac {\left (-\sqrt {e}+\sqrt {c^2 d+e}\right ) e^{-i \csc ^{-1}(c x)}}{c \sqrt {d}}\right )+16 i \arcsin \left (\frac {\sqrt {1+\frac {i \sqrt {e}}{c \sqrt {d}}}}{\sqrt {2}}\right ) \log \left (1+\frac {\left (-\sqrt {e}+\sqrt {c^2 d+e}\right ) e^{-i \csc ^{-1}(c x)}}{c \sqrt {d}}\right )+4 i \pi \log \left (1-\frac {\left (\sqrt {e}+\sqrt {c^2 d+e}\right ) e^{-i \csc ^{-1}(c x)}}{c \sqrt {d}}\right )-8 i \csc ^{-1}(c x) \log \left (1-\frac {\left (\sqrt {e}+\sqrt {c^2 d+e}\right ) e^{-i \csc ^{-1}(c x)}}{c \sqrt {d}}\right )-16 i \arcsin \left (\frac {\sqrt {1+\frac {i \sqrt {e}}{c \sqrt {d}}}}{\sqrt {2}}\right ) \log \left (1-\frac {\left (\sqrt {e}+\sqrt {c^2 d+e}\right ) e^{-i \csc ^{-1}(c x)}}{c \sqrt {d}}\right )+8 i \csc ^{-1}(c x) \log \left (1-e^{2 i \csc ^{-1}(c x)}\right )-4 i \pi \log \left (\sqrt {e}-\frac {i \sqrt {d}}{x}\right )+8 \operatorname {PolyLog}\left (2,\frac {\left (\sqrt {e}-\sqrt {c^2 d+e}\right ) e^{-i \csc ^{-1}(c x)}}{c \sqrt {d}}\right )+8 \operatorname {PolyLog}\left (2,\frac {\left (\sqrt {e}+\sqrt {c^2 d+e}\right ) e^{-i \csc ^{-1}(c x)}}{c \sqrt {d}}\right )+4 \operatorname {PolyLog}\left (2,e^{2 i \csc ^{-1}(c x)}\right )\right )}{16 d^{3/2}}\right ) \]

[In]

Integrate[(a + b*ArcCsc[c*x])/(x^2*(d + e*x^2)),x]

[Out]

-(a/(d*x)) - (a*Sqrt[e]*ArcTan[(Sqrt[e]*x)/Sqrt[d]])/d^(3/2) + b*(-((c*Sqrt[1 - 1/(c^2*x^2)]*x + ArcCsc[c*x])/
(d*x)) + (Sqrt[e]*(Pi^2 - 4*Pi*ArcCsc[c*x] + 8*ArcCsc[c*x]^2 - 32*ArcSin[Sqrt[1 - (I*Sqrt[e])/(c*Sqrt[d])]/Sqr
t[2]]*ArcTan[(((-I)*c*Sqrt[d] + Sqrt[e])*Cot[(Pi + 2*ArcCsc[c*x])/4])/Sqrt[c^2*d + e]] + (4*I)*Pi*Log[1 + (Sqr
t[e] - Sqrt[c^2*d + e])/(c*Sqrt[d]*E^(I*ArcCsc[c*x]))] - (8*I)*ArcCsc[c*x]*Log[1 + (Sqrt[e] - Sqrt[c^2*d + e])
/(c*Sqrt[d]*E^(I*ArcCsc[c*x]))] + (16*I)*ArcSin[Sqrt[1 - (I*Sqrt[e])/(c*Sqrt[d])]/Sqrt[2]]*Log[1 + (Sqrt[e] -
Sqrt[c^2*d + e])/(c*Sqrt[d]*E^(I*ArcCsc[c*x]))] + (4*I)*Pi*Log[1 + (Sqrt[e] + Sqrt[c^2*d + e])/(c*Sqrt[d]*E^(I
*ArcCsc[c*x]))] - (8*I)*ArcCsc[c*x]*Log[1 + (Sqrt[e] + Sqrt[c^2*d + e])/(c*Sqrt[d]*E^(I*ArcCsc[c*x]))] - (16*I
)*ArcSin[Sqrt[1 - (I*Sqrt[e])/(c*Sqrt[d])]/Sqrt[2]]*Log[1 + (Sqrt[e] + Sqrt[c^2*d + e])/(c*Sqrt[d]*E^(I*ArcCsc
[c*x]))] + (8*I)*ArcCsc[c*x]*Log[1 - E^((2*I)*ArcCsc[c*x])] - (4*I)*Pi*Log[Sqrt[e] + (I*Sqrt[d])/x] + 8*PolyLo
g[2, (-Sqrt[e] + Sqrt[c^2*d + e])/(c*Sqrt[d]*E^(I*ArcCsc[c*x]))] + 8*PolyLog[2, -((Sqrt[e] + Sqrt[c^2*d + e])/
(c*Sqrt[d]*E^(I*ArcCsc[c*x])))] + 4*PolyLog[2, E^((2*I)*ArcCsc[c*x])]))/(16*d^(3/2)) - (Sqrt[e]*(Pi^2 - 4*Pi*A
rcCsc[c*x] + 8*ArcCsc[c*x]^2 - 32*ArcSin[Sqrt[1 + (I*Sqrt[e])/(c*Sqrt[d])]/Sqrt[2]]*ArcTan[((I*c*Sqrt[d] + Sqr
t[e])*Cot[(Pi + 2*ArcCsc[c*x])/4])/Sqrt[c^2*d + e]] + (4*I)*Pi*Log[1 + (-Sqrt[e] + Sqrt[c^2*d + e])/(c*Sqrt[d]
*E^(I*ArcCsc[c*x]))] - (8*I)*ArcCsc[c*x]*Log[1 + (-Sqrt[e] + Sqrt[c^2*d + e])/(c*Sqrt[d]*E^(I*ArcCsc[c*x]))] +
 (16*I)*ArcSin[Sqrt[1 + (I*Sqrt[e])/(c*Sqrt[d])]/Sqrt[2]]*Log[1 + (-Sqrt[e] + Sqrt[c^2*d + e])/(c*Sqrt[d]*E^(I
*ArcCsc[c*x]))] + (4*I)*Pi*Log[1 - (Sqrt[e] + Sqrt[c^2*d + e])/(c*Sqrt[d]*E^(I*ArcCsc[c*x]))] - (8*I)*ArcCsc[c
*x]*Log[1 - (Sqrt[e] + Sqrt[c^2*d + e])/(c*Sqrt[d]*E^(I*ArcCsc[c*x]))] - (16*I)*ArcSin[Sqrt[1 + (I*Sqrt[e])/(c
*Sqrt[d])]/Sqrt[2]]*Log[1 - (Sqrt[e] + Sqrt[c^2*d + e])/(c*Sqrt[d]*E^(I*ArcCsc[c*x]))] + (8*I)*ArcCsc[c*x]*Log
[1 - E^((2*I)*ArcCsc[c*x])] - (4*I)*Pi*Log[Sqrt[e] - (I*Sqrt[d])/x] + 8*PolyLog[2, (Sqrt[e] - Sqrt[c^2*d + e])
/(c*Sqrt[d]*E^(I*ArcCsc[c*x]))] + 8*PolyLog[2, (Sqrt[e] + Sqrt[c^2*d + e])/(c*Sqrt[d]*E^(I*ArcCsc[c*x]))] + 4*
PolyLog[2, E^((2*I)*ArcCsc[c*x])]))/(16*d^(3/2)))

Maple [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 43.16 (sec) , antiderivative size = 332, normalized size of antiderivative = 0.58

method result size
parts \(-\frac {a}{d x}-\frac {a e \arctan \left (\frac {e x}{\sqrt {d e}}\right )}{d \sqrt {d e}}-\frac {b c \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}}{d}-\frac {b \,\operatorname {arccsc}\left (c x \right )}{d x}+\frac {b c e \left (\munderset {\textit {\_R1} =\operatorname {RootOf}\left (c^{2} d \,\textit {\_Z}^{4}+\left (-2 c^{2} d -4 e \right ) \textit {\_Z}^{2}+c^{2} d \right )}{\sum }\frac {i \operatorname {arccsc}\left (c x \right ) \ln \left (\frac {\textit {\_R1} -\frac {i}{c x}-\sqrt {1-\frac {1}{c^{2} x^{2}}}}{\textit {\_R1}}\right )+\operatorname {dilog}\left (\frac {\textit {\_R1} -\frac {i}{c x}-\sqrt {1-\frac {1}{c^{2} x^{2}}}}{\textit {\_R1}}\right )}{\textit {\_R1} \left (\textit {\_R1}^{2} c^{2} d -c^{2} d -2 e \right )}\right )}{2 d}+\frac {b c e \left (\munderset {\textit {\_R1} =\operatorname {RootOf}\left (c^{2} d \,\textit {\_Z}^{4}+\left (-2 c^{2} d -4 e \right ) \textit {\_Z}^{2}+c^{2} d \right )}{\sum }\frac {\textit {\_R1} \left (i \operatorname {arccsc}\left (c x \right ) \ln \left (\frac {\textit {\_R1} -\frac {i}{c x}-\sqrt {1-\frac {1}{c^{2} x^{2}}}}{\textit {\_R1}}\right )+\operatorname {dilog}\left (\frac {\textit {\_R1} -\frac {i}{c x}-\sqrt {1-\frac {1}{c^{2} x^{2}}}}{\textit {\_R1}}\right )\right )}{\textit {\_R1}^{2} c^{2} d -c^{2} d -2 e}\right )}{2 d}\) \(332\)
derivativedivides \(c \left (-\frac {a}{d c x}-\frac {a e \arctan \left (\frac {e x}{\sqrt {d e}}\right )}{c d \sqrt {d e}}-\frac {b \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}}{d}-\frac {b \,\operatorname {arccsc}\left (c x \right )}{d c x}+\frac {b e \left (\munderset {\textit {\_R1} =\operatorname {RootOf}\left (c^{2} d \,\textit {\_Z}^{4}+\left (-2 c^{2} d -4 e \right ) \textit {\_Z}^{2}+c^{2} d \right )}{\sum }\frac {i \operatorname {arccsc}\left (c x \right ) \ln \left (\frac {\textit {\_R1} -\frac {i}{c x}-\sqrt {1-\frac {1}{c^{2} x^{2}}}}{\textit {\_R1}}\right )+\operatorname {dilog}\left (\frac {\textit {\_R1} -\frac {i}{c x}-\sqrt {1-\frac {1}{c^{2} x^{2}}}}{\textit {\_R1}}\right )}{\textit {\_R1} \left (\textit {\_R1}^{2} c^{2} d -c^{2} d -2 e \right )}\right )}{2 d}+\frac {b e \left (\munderset {\textit {\_R1} =\operatorname {RootOf}\left (c^{2} d \,\textit {\_Z}^{4}+\left (-2 c^{2} d -4 e \right ) \textit {\_Z}^{2}+c^{2} d \right )}{\sum }\frac {\textit {\_R1} \left (i \operatorname {arccsc}\left (c x \right ) \ln \left (\frac {\textit {\_R1} -\frac {i}{c x}-\sqrt {1-\frac {1}{c^{2} x^{2}}}}{\textit {\_R1}}\right )+\operatorname {dilog}\left (\frac {\textit {\_R1} -\frac {i}{c x}-\sqrt {1-\frac {1}{c^{2} x^{2}}}}{\textit {\_R1}}\right )\right )}{\textit {\_R1}^{2} c^{2} d -c^{2} d -2 e}\right )}{2 d}\right )\) \(340\)
default \(c \left (-\frac {a}{d c x}-\frac {a e \arctan \left (\frac {e x}{\sqrt {d e}}\right )}{c d \sqrt {d e}}-\frac {b \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}}{d}-\frac {b \,\operatorname {arccsc}\left (c x \right )}{d c x}+\frac {b e \left (\munderset {\textit {\_R1} =\operatorname {RootOf}\left (c^{2} d \,\textit {\_Z}^{4}+\left (-2 c^{2} d -4 e \right ) \textit {\_Z}^{2}+c^{2} d \right )}{\sum }\frac {i \operatorname {arccsc}\left (c x \right ) \ln \left (\frac {\textit {\_R1} -\frac {i}{c x}-\sqrt {1-\frac {1}{c^{2} x^{2}}}}{\textit {\_R1}}\right )+\operatorname {dilog}\left (\frac {\textit {\_R1} -\frac {i}{c x}-\sqrt {1-\frac {1}{c^{2} x^{2}}}}{\textit {\_R1}}\right )}{\textit {\_R1} \left (\textit {\_R1}^{2} c^{2} d -c^{2} d -2 e \right )}\right )}{2 d}+\frac {b e \left (\munderset {\textit {\_R1} =\operatorname {RootOf}\left (c^{2} d \,\textit {\_Z}^{4}+\left (-2 c^{2} d -4 e \right ) \textit {\_Z}^{2}+c^{2} d \right )}{\sum }\frac {\textit {\_R1} \left (i \operatorname {arccsc}\left (c x \right ) \ln \left (\frac {\textit {\_R1} -\frac {i}{c x}-\sqrt {1-\frac {1}{c^{2} x^{2}}}}{\textit {\_R1}}\right )+\operatorname {dilog}\left (\frac {\textit {\_R1} -\frac {i}{c x}-\sqrt {1-\frac {1}{c^{2} x^{2}}}}{\textit {\_R1}}\right )\right )}{\textit {\_R1}^{2} c^{2} d -c^{2} d -2 e}\right )}{2 d}\right )\) \(340\)

[In]

int((a+b*arccsc(c*x))/x^2/(e*x^2+d),x,method=_RETURNVERBOSE)

[Out]

-a/d/x-a*e/d/(d*e)^(1/2)*arctan(e*x/(d*e)^(1/2))-b*c/d*((c^2*x^2-1)/c^2/x^2)^(1/2)-b*arccsc(c*x)/d/x+1/2*b*c*e
/d*sum(1/_R1/(_R1^2*c^2*d-c^2*d-2*e)*(I*arccsc(c*x)*ln((_R1-I/c/x-(1-1/c^2/x^2)^(1/2))/_R1)+dilog((_R1-I/c/x-(
1-1/c^2/x^2)^(1/2))/_R1)),_R1=RootOf(c^2*d*_Z^4+(-2*c^2*d-4*e)*_Z^2+c^2*d))+1/2*b*c*e/d*sum(_R1/(_R1^2*c^2*d-c
^2*d-2*e)*(I*arccsc(c*x)*ln((_R1-I/c/x-(1-1/c^2/x^2)^(1/2))/_R1)+dilog((_R1-I/c/x-(1-1/c^2/x^2)^(1/2))/_R1)),_
R1=RootOf(c^2*d*_Z^4+(-2*c^2*d-4*e)*_Z^2+c^2*d))

Fricas [F]

\[ \int \frac {a+b \csc ^{-1}(c x)}{x^2 \left (d+e x^2\right )} \, dx=\int { \frac {b \operatorname {arccsc}\left (c x\right ) + a}{{\left (e x^{2} + d\right )} x^{2}} \,d x } \]

[In]

integrate((a+b*arccsc(c*x))/x^2/(e*x^2+d),x, algorithm="fricas")

[Out]

integral((b*arccsc(c*x) + a)/(e*x^4 + d*x^2), x)

Sympy [F]

\[ \int \frac {a+b \csc ^{-1}(c x)}{x^2 \left (d+e x^2\right )} \, dx=\int \frac {a + b \operatorname {acsc}{\left (c x \right )}}{x^{2} \left (d + e x^{2}\right )}\, dx \]

[In]

integrate((a+b*acsc(c*x))/x**2/(e*x**2+d),x)

[Out]

Integral((a + b*acsc(c*x))/(x**2*(d + e*x**2)), x)

Maxima [F(-2)]

Exception generated. \[ \int \frac {a+b \csc ^{-1}(c x)}{x^2 \left (d+e x^2\right )} \, dx=\text {Exception raised: ValueError} \]

[In]

integrate((a+b*arccsc(c*x))/x^2/(e*x^2+d),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(e>0)', see `assume?` for more
details)Is e

Giac [F(-2)]

Exception generated. \[ \int \frac {a+b \csc ^{-1}(c x)}{x^2 \left (d+e x^2\right )} \, dx=\text {Exception raised: RuntimeError} \]

[In]

integrate((a+b*arccsc(c*x))/x^2/(e*x^2+d),x, algorithm="giac")

[Out]

Exception raised: RuntimeError >> an error occurred running a Giac command:INPUT:sage2OUTPUT:sym2poly/r2sym(co
nst gen & e,const index_m & i,const vecteur & l) Error: Bad Argument Value

Mupad [F(-1)]

Timed out. \[ \int \frac {a+b \csc ^{-1}(c x)}{x^2 \left (d+e x^2\right )} \, dx=\int \frac {a+b\,\mathrm {asin}\left (\frac {1}{c\,x}\right )}{x^2\,\left (e\,x^2+d\right )} \,d x \]

[In]

int((a + b*asin(1/(c*x)))/(x^2*(d + e*x^2)),x)

[Out]

int((a + b*asin(1/(c*x)))/(x^2*(d + e*x^2)), x)